# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=py3-parso
pkgver=0.8.3
pkgrel=2
pkgdesc="parser that supports error recovery and round-trip parsing for different Python versions"
url="https://github.com/davidhalter/parso"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools py3-pbr"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="
	https://files.pythonhosted.org/packages/source/p/parso/parso-$pkgver.tar.gz
	"
builddir="$srcdir/parso-$pkgver"

replaces="py-parso" # Backwards compatibility
provides="py-parso=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	# python 3.10 errors: https://github.com/davidhalter/parso/issues/192
	py.test-3 -v \
		--deselect test/test_python_errors.py
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
6a8626b2aa254e8c3b5afbacd122085d5a69ea04aeb271141f284822e300e8f7f1a53f9dc483a6522fe309cf09f60624972bb666d3a82d06af808c6790f87f1d  parso-0.8.3.tar.gz
"
